package com.xuecheng.education.common.model;

/**
 *
 * 响应数据的预定义
 *
 * @Author: island
 * @CreateDate: 2020/8/7 15:05
 * @ProjectName: xuecheng-education-parent
 */
public enum ResultCode {

    /**
     * 操作失败
     */
    FAIL(1001 , "操作失败！", false),

    /**
     * 操作成功
     */
    SUCCESS(1002,"操作成功",true),

    /**
     * 未授权
     */
    UNAUTHORIZED(2001,"未登录！",false),

    /**
     * 已授权
     */
    AUTHORIZED(2002,"已登录",true);


    private Integer code;
    private String msg;
    private Boolean flag;

    ResultCode(Integer code,String msg,Boolean flag){
        this.code = code;
        this.msg = msg;
        this.flag = flag;
    }
    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public Boolean getFlag() {
        return flag;
    }

    public void setFlag(Boolean flag) {
        this.flag = flag;
    }}
